import React from 'react'
import { Breadcrumb } from 'antd'
import { Link } from 'react-router-dom'

const PageBreadcrumb = (props) => {
  return (
    <>
      <Breadcrumb>
        <Breadcrumb.Item><Link to="/">首页</Link></Breadcrumb.Item>
        {
          React.Children.map(props.children, (child) => {
            return <Breadcrumb.Item>{child}</Breadcrumb.Item>
          })
        }
      </Breadcrumb>
    </>
  )
}

export default PageBreadcrumb
